package it.poste.il.compensatore.service;

import it.poste.il.compensatore.entities.Message;
import it.poste.il.compensatore.entities.MessageBody;
import it.poste.il.compensatore.entities.SDPRequest;
import it.poste.il.compensatore.utilities.Constant.DEF_VERIFY_RESULT;

/**
 * Interface of DataManagerService.
 */
public interface DataManagerService {

	/**
	 * Method storeMsg.
	 * Return message Id.
	 * @return messageId value;
	 */
	MessageBody storeMsg(String msg, SDPRequest requestId);

	/**
	 * Method verifyRequest.
	 * Return verify result. 1 if not duplicate,2 to cancel, 3 to riallign
	 * @return check result;
	 */
	DEF_VERIFY_RESULT verifyRequest(SDPRequest requestId, String fase);

	/**
	 * Method createAvoidMessage.
	 * Return cancel message FOR requestId.
	 * @return Cancel message;
	 */
	String createAvoidMessage(String requestId);

	/**
	 * Method changeStatus.
	 * Change message status.
	 * @param message to changer status
	 * @return update result
	 */
	boolean changeStatus(Message message, Long status);
}
